const fs = require('fs');
const rs = fs.createReadStream('./test2.txt');
// 监听可写流是否打开
rs.on('open',()=>{
    console.log('可读流打开了！！');
})
// 监听可写流关闭
rs.on('close',()=>{
    console.log('可读流关闭！！');
})
rs.on("data",data=>{
    console.log(data);
    console.log(data.toString());
})